$OpenBSD: patch-include_mapnik_json_feature_grammar_hpp,v 1.1 2015/07/01 08:45:19 jasper Exp $

From 76f111cc97a86cb029682f92b3d212f105f46aa6 Mon Sep 17 00:00:00 2001
From: Dane Springmeyer <dane@dbsgeo.com>
Date: Sat, 27 Jul 2013 01:57:24 -0400
Subject: [PATCH] support optionally compiling with -std=c++11 on OSX / clang / apple libc++ / boost 1.53 - refs #1683

--- include/mapnik/json/feature_grammar.hpp.orig	Tue Jun  4 03:35:27 2013
+++ include/mapnik/json/feature_grammar.hpp	Mon Jun 29 09:08:51 2015
@@ -66,9 +66,34 @@ class attribute_value_visitor (public)
     mapnik::transcoder const& tr_;
 };
 
+#ifdef BOOST_SPIRIT_USE_PHOENIX_V3
 struct put_property
 {
+    typedef void result_type;
+    explicit put_property(mapnik::transcoder const& tr)
+        : tr_(tr) {}
     template <typename T0,typename T1, typename T2>
+    result_type operator() (T0 & feature, T1 const& key, T2 const& val) const
+    {
+        mapnik::value v = boost::apply_visitor(attribute_value_visitor(tr_),val); // TODO: optimize
+        feature.put_new(key, v);
+    }
+    mapnik::transcoder const& tr_;
+};
+
+struct extract_geometry
+{
+    typedef  boost::ptr_vector<mapnik::geometry_type>& result_type;
+    template <typename T>
+    result_type operator() (T & feature) const
+    {
+        return feature.paths();
+    }
+};
+#else
+struct put_property
+{
+    template <typename T0,typename T1, typename T2>
     struct result
     {
         typedef void type;
@@ -100,11 +125,12 @@ struct extract_geometry
         return feature.paths();
     }
 };
+#endif
 
 template <typename Iterator, typename FeatureType>
 struct feature_grammar :
-    qi::grammar<Iterator, void(FeatureType&),
-                space_type>
+        qi::grammar<Iterator, void(FeatureType&),
+        space_type>
 {
     feature_grammar(mapnik::transcoder const& tr);
 
